

struct
  4 field ->3D-x   \ int
  4 field ->3D-y
  4 field ->3D-z
  4 field ->nx  \ float
  4 field ->ny
  4 field ->nz
  2 field ->3D-u   \ short
  2 field ->3D-v
  4 field ->3D-rgba
end-struct /3D

: set-3d-pointers   ( addr/ofs -- )
   drop locals|  a/o  |
   glVertexPointer( 3 GL_INT  /3D  a/o ->3D-x )
   glNormalPointer( 3 GL_FLOAT  /3D    a/o ->nx )
   glTexCoordPointer( 2 GL_SHORT  /3D    a/o ->3D-u )
   glColorPointer( 4 GL_UNSIGNED_BYTE  /3D    a/o ->3D-rgba ) ;

: vertex3D   ( x y z -- )
   vpointer a! rot !a+ swap !a+ !a+ 12 +a tcoord-x h!a+ tcoord-y h!a+ vcolor !a+ ;

Create 3D   /3D , ' set-3d-pointers ,

